<!DOCTYPE html>
<html>
	<head>
		<meta charset='UTF-8'/>
			<h1 class="title-page" style="font-size: 30px;">Inscription</h1>
			<p class="title-block">Nouveau client ?</p>
		</head>
<body>
	<section class="">
		<form action="inscription.php" method="post">
			<div>
				<label for="Pseudo">Pseudo</label>
					<input type="text" name="Pseudo" id="Pseudo" value="" required/>
					</br>
				<label for="Nom">Nom</label>
					<input type="text" name="Nom" id="Nom" value="" required/>
					</br>
				<label for="Prenom">Prenom</label>
					<input type="text" name="Prenom" id="Prenom" value="" required/>
					</br>
				<label for="Password">Password</label>
					<input type="text" name="Password" id="Password" value=""required/>
					</br>
				<label for="Email">Email</label>
					<input type="text" name="Email" id="Email" class="" placeholder="Indiquez votre e-mail" required/>
					</br>
			
					<form method="post" action="inscription.php" enctype="multipart/form-data">
					<label for="icone">Icône du fichier (JPG, PNG ou GIF | max. 15 Ko) :</label><br />
     				<input type="file" name="icone" id="icone" /><br />
     			</form>

                 <button type="submit" class="">Je m'inscrie</button>
           	</div>
		</form>
	</section>
<?php
		else {
			$Pseudo = $_POST['Pseudo'];
			$Nom = $_POST['Nom'];
			$Prenom = $_POST['Prenom'];
			$Email = $_POST['Email'];
			$Sexe = $_POST['Sexe'];
			$Password = $_POST['¨Password'];
			$Avatar = $_POST['Avatar'];

			$bdd = mysqli_connect('localhost', 'root', '', 'Cappicinoo');
			$query = "INSERT INTO Users (Nom, Prenom, Sexe, Email, Password, Avatar, Pseudo) VALUES ('".$Nom."', '".$Prenom."', '".$Sexe."', '".$Email."', '".$Password."', '".$Avatar."', '".$Pseudo."');";
			$response = mysqli_query($bdd, $query) or die(mysqli_error());
		}
?>
</body>
</html>